package Multithreading.Exercise001;

/**
 * ClassName:ThreadDome005
 * Package:Multithreading.Exercise
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/3/5-16:37
 * @Version:v1.0
 */
public class ThreadDome005 {
    //public static void join() 插入线程/插队线程
    public static void main(String[] args) throws InterruptedException {
        MyThread t = new MyThread();
        t.setName("土豆");

        t.start();
        //表示把t这个线程,插入到当前线程之前
        //当前线程：main线程
        t.join();


        //执行在main线程当中的
        for (int i = 0; i < 10; i++) {
            System.out.println("main线程"+i);
        }
    }
}
